<script setup>
import { ref, onMounted } from 'vue'

const navBar = ref(null)
const navHeight = ref(0)

onMounted(() => {
  navHeight.value = navBar.value.clientHeight
})
</script>
<template>
  <header ref="navBar">
    <van-nav-bar title="我的券包" />
  </header>
  <div class="bg-container" :style="`--nav-height:${navHeight}px`"></div>
  <div class="coupon-container">11</div>
</template>
<style lang="less">
@import url("@/styles/test");
</style>